﻿using Learun.Util;
using System.Collections.Generic;

namespace Learun.Application.TwoDevelopment.ZZDT_EC
{
    /// <summary>
    /// 版 本 PIT-ADMS V7.0.3 敏捷开发框架
    /// Copyright (c) 2013-2018 Hexagon PPM
    /// 创 建：超级管理员
    /// 日 期：2022-03-07 13:44
    /// 描 述：工程数据表
    /// </summary>
    public interface ec_enginedataIBLL
    {
        #region 获取数据
        /// <summary>
        /// 获取页面显示列表数据
        /// <summary>
        /// <param name="queryJson">查询参数</param>
        /// <returns></returns>
        IEnumerable<ec_enginedataEntity> GetListBySQL(string sqlWhere, string projId);
        /// <summary>
        /// 获取回收站页面显示列表数据
        /// <summary>
        /// <param name="queryJson">查询参数</param>
        /// <returns></returns>
        IEnumerable<ec_enginedataEntity> GetRecycleBinPageList(Pagination pagination, string queryJson);
        /// <summary>
        /// 获取页面显示列表数据
        /// <summary>
        /// <param name="queryJson">查询参数</param>
        /// <returns></returns>
        IEnumerable<ec_enginedataEntity> GetList(string queryJson, Pagination pagination = null, bool Distinct = true, bool DataFromWeb = false);

        IEnumerable<ec_enginedataEntity> GetListByPixel(string projId, string dwgFileId, string pixelCodes);
        /// <summary>
        /// 获取实体数据
        /// <param name="keyValue">主键</param>
        /// <summary>
        /// <returns></returns>
        ec_enginedataEntity GetEntity(string keyValue, string ProjectId);
        /// <summary>
        /// 获取记录条数
        /// <param name="keyValue">主键</param>
        /// <summary>
        /// <returns></returns>
        int GetDataCount(string ProjectId);
        #endregion

        #region 提交数据

        /// <summary>
        /// 删除实体数据
        /// <param name="keyValue">主键</param>
        /// <summary>
        /// <returns></returns>
        void DeleteEntity(string keyValue, string ProjectId);
        /// <summary>
        /// 保存实体数据（新增、修改）
        /// <param name="keyValue">主键</param>
        /// <summary>
        /// <returns></returns>
        void SaveEntity(string keyValue, ec_enginedataEntity entity, string ProjectId);

        /// <summary>
        /// 批量保存导入的工程数据、属性
        /// <summary>
        /// <returns></returns>
        void SaveImportData(List<ec_enginedataEntity> entityList, string ProjectId);
        /// <summary>
        /// 批量修改数据状态
        /// <summary>
        /// <returns></returns>
        void UpdateDataStatus(List<ec_enginedataEntity> entityList, string ProjectId);
        /// <summary>
        /// 对象浏览器修改位号
        /// </summary>
        /// <param name="projectId">项目ID</param>
        /// <param name="oldTagNumber">修改前位号</param>
        /// <param name="newTagNumber">修改后位号</param>
        /// <param name="isCover">是否覆盖:覆盖 1，不覆盖 0</param>
        /// <returns></returns>
        void RenameTagNumber(string projectId, string oldTagNumber, string newTagNumber, string isCover);
        /// <summary>
        /// 图元属性修改
        /// </summary>
        /// <param name="projectId">项目ID</param>
        /// <param name="entity">工程数据实体</param>
        /// <param name="caseID">工况ID</param>
        void UpdatePixelAndProp(string projectId, ec_enginedataEntity entity);
        /// <summary>
        /// 更新工程数据属性
        /// </summary>
        void UpdateEngineDataByDefaultValue();
        #endregion

    }
}
